package com.jy.api.service;

import com.jy.api.domain.Coupon;
import com.jy.api.domain.CouponStatus;
import com.jy.api.payRes.CouponDto;
import com.jy.api.signUpReq.admin.CouponSignUpReq;
import com.jy.api.signUpReq.admin.DistributeCouponSignUpReq;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

/**
 * Created by lihu on 2017/11/17.
 */
public interface CouponService {

    /**
     * 修改或新建优惠卷
     *
     * @param couponSignUpReq
     */
    void saveOrUpdate(CouponSignUpReq couponSignUpReq);

    /**
     * 获取店铺(未过期)优惠卷信息（分页）
     *
     * @param storeId
     * @param pageable
     * @return
     */
    Page<Coupon> getCoupon(String storeId, Pageable pageable);

    /**
     * 获取店铺优惠卷信息（分页）
     *
     * @param storeId
     * @param pageable
     * @return
     */
    CouponDto getCouponAll(String storeId, CouponStatus couponStatus, Pageable pageable);

    Page<Coupon> getCouponAll(String storeId, Pageable pageable);
    /**
     * 删除优惠卷
     *
     * @param id
     */
    void deleteCoupon(String id);

    /**
     * 优惠卷获取
     *
     * @param id
     * @return
     */
    Coupon getFondId(String id);

    /**
     * 优惠卷派发
     *
     * @param signUpReq
     */
    void distributeCoupon(DistributeCouponSignUpReq signUpReq, Coupon coupon,
                          String creatorId, String creatorName);


}
